package com.southminority.ethnic.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.southminority.ethnic.column.ExcelColumn;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 科研项目实体类
 * 对应数据库表：research_project
 * 
 * @author SouthMinority
 */
@Data
@TableName("research_project")
public class ResearchProject implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 科研项目ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ExcelColumn(name = "项目ID", columnWidth = 10, value = "1", hidden = true)
    private Long id;

    /**
     * 项目标题
     */
    @TableField("title")
    @ExcelColumn(name = "项目标题", columnWidth = 25, nonNull = true, value = "示例项目")
    private String title;

    /**
     * 项目编号
     */
    @TableField("project_number")
    @ExcelColumn(name = "项目编号", columnWidth = 18, value = "RP-2025-001")
    private String projectNumber;

    /**
     * 项目类型：ongoing-在研，completed-已完成，planning-规划中
     */
    @TableField("project_type")
    @ExcelColumn(name = "项目类型(ongoing/completed/planning)", columnWidth = 28, value = "ongoing")
    private String projectType;

    /**
     * 项目级别：国家级、省部级、厅局级、校级等
     */
    @TableField("level")
    @ExcelColumn(name = "项目级别", columnWidth = 15, value = "省部级")
    private String level;

    /**
     * 归属机构ID
     */
    @TableField("organization_id")
    @ExcelColumn(name = "机构ID", columnWidth = 12, value = "1")
    private Long organizationId;

    /**
     * 资助机构
     */
    @TableField("funding_organization")
    @ExcelColumn(name = "资助机构", columnWidth = 20, value = "国家基金委")
    private String fundingOrganization;

    /**
     * 资助金额
     */
    @TableField("funding_amount")
    @ExcelColumn(name = "资助金额", columnWidth = 15, value = "100000")
    private String fundingAmount;

    /**
     * 开始年份
     */
    @TableField("start_year")
    @ExcelColumn(name = "开始年份", columnWidth = 12, value = "2025")
    private Integer startYear;

    /**
     * 结束年份
     */
    @TableField("end_year")
    @ExcelColumn(name = "结束年份", columnWidth = 12, value = "2027")
    private Integer endYear;

    /**
     * 开始日期
     */
    @TableField("start_date")
    @ExcelColumn(name = "开始日期", columnWidth = 18, value = "2025/01/01 00:00:00")
    private LocalDate startDate;

    /**
     * 结束日期
     */
    @TableField("end_date")
    @ExcelColumn(name = "结束日期", columnWidth = 18, value = "2027/12/31 00:00:00")
    private LocalDate endDate;

    /**
     * 项目负责人
     */
    @TableField("principal_investigator")
    @ExcelColumn(name = "负责人", columnWidth = 15, value = "李教授")
    private String principalInvestigator;

    /**
     * 项目描述
     */
    @TableField("description")
    @ExcelColumn(name = "项目描述", columnWidth = 40, value = "项目描述示例")
    private String description;

    /**
     * 项目目标
     */
    @TableField("objectives")
    @ExcelColumn(name = "项目目标", columnWidth = 30, value = "目标示例")
    private String objectives;

    /**
     * 研究内容
     */
    @TableField("research_content")
    @ExcelColumn(name = "研究内容", columnWidth = 40, value = "研究内容示例")
    private String researchContent;

    /**
     * 项目成员（JSON格式）
     */
    @TableField("members")
    @ExcelColumn(name = "成员(JSON)", columnWidth = 40, value = "['张三','李四']")
    private String members;

    /**
     * 主要成果（JSON格式）
     */
    @TableField("outcomes")
    @ExcelColumn(name = "主要成果(JSON)", columnWidth = 40, value = "['论文','专利']")
    private String outcomes;

    /**
     * 取得成就
     */
    @TableField("achievements")
    @ExcelColumn(name = "取得成就", columnWidth = 30, value = "示例成就")
    private String achievements;

    /**
     * 发表论文（JSON格式）
     */
    @TableField("publications")
    @ExcelColumn(name = "发表论文(JSON)", columnWidth = 40, value = "['Paper A','Paper B']")
    private String publications;

    /**
     * 关键词
     */
    @TableField("keywords")
    @ExcelColumn(name = "关键词", columnWidth = 20, value = "民族;语言")
    private String keywords;

    /**
     * 项目封面图片
     */
    @TableField("cover_image")
    @ExcelColumn(name = "封面URL", columnWidth = 40, value = "https://example.com/cover.png")
    private String coverImage;

    /**
     * 附件文件URLs（JSON格式）
     */
    @TableField("attachment_urls")
    @ExcelColumn(name = "附件URLs(JSON)", columnWidth = 40, value = "['https://example.com/a.pdf']")
    private String attachmentUrls;

    /**
     * 项目进度百分比
     */
    @TableField("progress_percentage")
    @ExcelColumn(name = "进度%", columnWidth = 10, value = "30")
    private Integer progressPercentage;

    /**
     * 排序
     */
    @TableField("sort_order")
    @ExcelColumn(name = "排序", columnWidth = 10, value = "0", hidden = true)
    private Integer sortOrder;

    /**
     * 是否重点项目：1-是，0-否
     */
    @TableField("is_featured")
    @ExcelColumn(name = "重点项目(1/0)", columnWidth = 15, value = "1", hidden = true)
    private Integer isFeatured;

    /**
     * 状态：1-启用，0-禁用，-1-已删除
     */
    @TableField("status")
    @ExcelColumn(name = "状态(1启用/0禁用)", columnWidth = 15, value = "1", hidden = true)
    private Integer status;

    /**
     * 创建时间
     */
    @TableField("create_time")
    @ExcelColumn(name = "创建时间", columnWidth = 25, hidden = true)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    @ExcelColumn(name = "更新时间", columnWidth = 25, hidden = true)
    private LocalDateTime updateTime;
} 
